package com.codeZ.ChainOfResponsibilityPattern.achieve;

/**
 * 客户端
 *
 * @author codeZhang
 * @Date 2024/8/28 10:25
 */
public class Client {

    public static void main(String[] args) {
        Handler h1 = new HandlerA();
        Handler h2 = new HandlerB();
        h1.setSuccessor(h2);
        h2.setSuccessor(null);
        RequestData requestData = new RequestData("请求数据ABCDE");
        h1.handle(requestData);
    }
}
